'use strict';

function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; }

var vue = new Vue({
    data: {
        php_os: '',
        timezone: '',
        php_version: '',
        mysql_version: ''
    },
    methods: {},
    created: function created() {},
    mounted: function () {
        var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
            var response, data;
            return regeneratorRuntime.wrap(function _callee$(_context) {
                while (1) {
                    switch (_context.prev = _context.next) {
                        case 0:

                            this.$check_login();

                            _context.prev = 1;
                            _context.next = 4;
                            return axios.post('/api/home/main', {});

                        case 4:
                            response = _context.sent;
                            data = response.data;

                            this.php_os = data.data.php_os;
                            this.timezone = data.data.timezone;
                            this.php_version = data.data.php_version;
                            this.mysql_version = data.data.mysql_version;
                            _context.next = 15;
                            break;

                        case 12:
                            _context.prev = 12;
                            _context.t0 = _context['catch'](1);

                            this.$message.error(_context.t0.toString());

                        case 15:
                        case 'end':
                            return _context.stop();
                    }
                }
            }, _callee, this, [[1, 12]]);
        }));

        function mounted() {
            return _ref.apply(this, arguments);
        }

        return mounted;
    }()
}).$mount('#app');